FROM maven:3.8.3-jdk-8-openj9 as build
WORKDIR /workspace
COPY ./src  /workspace/src
COPY ./Dockerfile /workspace/
COPY ./pom.xml /workspace/
RUN  mvn clean package -DskipTests

FROM openjdk:8-jre-bullseye
COPY --from=build /workspace/target/ai_virtual_human-0.0.1-SNAPSHOT.jar /ai-vh.jar
#RUN apt-get update && \
#    apt-get upgrade && \
#    apt-get install procps && \
#    apt-get install inetutils-ping && \
#    apt-get install curl && \
#    apt-get install net-tools && \
#    apt-get install vim
#    apt-get install mariadb-client

ENTRYPOINT ["java", "-jar", "/ai-vh.jar"]